﻿Imports DTO

Public Class PhieuThuDAO
    Public Sub Them(ByVal ptDTO As PhieuThuDTO)
        Try
            Dim db As New QuanLyNhaSachDataContext
            Dim pt As New PhieuThu
            pt.TenKH = ptDTO.TenKH
            pt.DiaChi = ptDTO.DiaChi
            pt.Email = ptDTO.Email
            pt.NgayThu = ptDTO.NgayThu
            pt.Phone = ptDTO.Phone
            pt.SoTienThu = ptDTO.SoTienThu

            db.PhieuThus.InsertOnSubmit(pt)
            db.SubmitChanges()
        Catch ex As Exception

        End Try
    End Sub
End Class
